//
//  ThematicCollectionTableViewCell.m
//  高仿萝卜书摘
//
//  Created by 谢俊逸 on 2016/11/22.
//  Copyright © 2016年 谢俊逸. All rights reserved.
//

#import "ThematicCollectionTableViewCell.h"
#import "ActiveAreaCollectionView.h"
#import "XJYHeader.h"

@implementation ThematicCollectionTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    //cell持有collectionView,cell负责创建他
    
    UIImage *image1 = [UIImage imageNamed:@"2-1"];
    UIImage *image2 = [UIImage imageNamed:@"2-2"];
    UIImage *image3 = [UIImage imageNamed:@"2-3"];
    UIImage *image4 = [UIImage imageNamed:@"2-4"];
    NSArray *array = @[image1, image2,image3,image4];
    
    [self setupCollectionViewWithFrame:CGRectMake(0, 0, [UIScreen mainScreen].bounds.size.width, 400) imageArray:array itemSize:CGSizeMake((ScreenW-30)/2,182)];
    
}


- (void)setupCollectionViewWithFrame:(CGRect)frame imageArray:(NSArray *)imageArray itemSize:(CGSize)itemSize{
    
    ActiveAreaCollectionView *collectionView = [[ActiveAreaCollectionView alloc] initWithFrame:frame collectionViewItemSize:itemSize withImageArr:imageArray];
    [self.contentView addSubview:collectionView];
    
}






- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
    
    // Configure the view for the selected state
}

@end
